package shapes;

import geom.Vector;
import processing.core.PApplet;

public class Vertex extends Vector implements Shape{
	Vector normal;
	float u;
	float v;
	float alpha;
	public Vertex() {
		super();
	}
	
	public Vertex(Vector pos, Vector normal, float u, float v, float alpha){
		super(pos);
		this.normal = normal;
		this.u = u;
		this.v = v;
	}
	
	public Vertex(Vector pos, Vector normal){
		this(pos, normal, -1, -1, 255);
	}
	
	public Vertex(Vector pos){
		this(pos, null, -1, -1, 255);
	}
	
	public Vertex(Vector pos, Vector normal, float alpha){
		this(pos, normal, -1, -1, alpha);
	}
	
	public Vertex(Vector pos, float alpha){
		this(pos, null, -1, -1, alpha);
	}
	
	public void draw(PApplet pa){
		if(normal != null) pa.normal(normal.x, normal.y, normal.z);
		if(u >= 0 && v >= 0){
			System.out.println("U " + u + " V " + v);
			pa.vertex(x, y, z, u, v);
		}
		else
			pa.vertex(x, y, z);
	}

	public void scale(float s) {
		// TODO Auto-generated method stub
		
	}
	
	
	

}
